//
//  YXAmendPasswordView.m
//  跑跑快销
//
//  Created by 杨潇 on 14-4-30.
//  Copyright (c) 2014年 ylife. All rights reserved.
//

#import "YXAmendPasswordView.h"

@implementation YXAmendPasswordView
@synthesize affirmBtn;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        NSArray * placeholder = [NSArray arrayWithObjects:@"请输入旧密码",@"请输入新密码",@"请确认新密码", nil];
        int tfY = 0;
        for (int i = 0; i < 3; i ++) {
            UITextField * passwordTF = [[UITextField alloc] initWithFrame:CGRectMake(20, 20 + (40 + 10)*i, 280, 40)];
            passwordTF.borderStyle = UITextBorderStyleRoundedRect;
            passwordTF.placeholder = [placeholder objectAtIndex:i];
            passwordTF.tag = i + 1;
            passwordTF.secureTextEntry = YES;
            [passwordTF addTarget:self action:@selector(down) forControlEvents:UIControlEventEditingDidEndOnExit];
            [self addSubview:passwordTF];
            tfY = passwordTF.frame.origin.y + passwordTF.frame.size.height;
        }
        
        affirmBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        affirmBtn.backgroundColor = [UIColor blueColor];
        affirmBtn.layer.cornerRadius = 8;
        [affirmBtn setTitle:@"确认修改" forState:UIControlStateNormal];
        affirmBtn.frame = CGRectMake(20, tfY + 20, 280, 40);
        [self addSubview:affirmBtn];
    }
    return self;
}

- (void)down
{
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
